﻿using Abp.Runtime.Security;
using System.Text;

namespace Mt.Site.Core.Security
{
    public static class SimpleStringCipherHelper
    {
        public const string InitVectorString = "1234BCHF9876skd*";
        public const string MyKey = "84ncpaKMC_!TuAna";

        private static SimpleStringCipher instance => new SimpleStringCipher
        {
            InitVectorBytes = Encoding.ASCII.GetBytes(InitVectorString)
        };

        public static string Encrypt(string plainText)
        {
            return instance.Encrypt(plainText, MyKey);
        }

        public static string Decrypt(string enryptedText)
        {
            return instance.Decrypt(enryptedText, MyKey);
        }
    }
}
